<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="./jQuery.js"></script>
    <title>Document</title>
</head>

<body>
    <div class="cont"></div>
</body>
<script>
    $.ajax({
        type: 'get',
        url: './date/笑话.json',
        async: true,
        success(res) {
            let data = res.showapi_res_body.contentlist

            data.forEach(item => {
                let module = `
                       <h2>${item.title ? item.title : ''}</h2>
                       <p>${item.ct}</p> 
                    `
                $('.cont').append(module)
                let str = /\d+/g
                let xhl = item.text.split(str)
                for (let i = 1; i < xhl.length; i++) {
                    let reg =`${i + xhl[i]}<br>` 
                    let mo = `<p>${reg}</p>`
                    $('.cont').append(mo)
                }
            });
        }
    })
</script>

</html>